﻿using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace CommonMvc.Common
{
    public interface IUser
    {
        bool IsLogin { get; set; }
    }
    public enum UserType
    {
        Sys,//系统管理员账号
        WeiXin,//微信浏览器对应类型
        App,//app用户账号

    }

    public class User : IUser
    {
       
        /// <summary>
        /// 用户id
        /// </summary>
        public int UserId { get; set; }
        /// <summary>
        /// 用户类型
        /// </summary>
        public UserType UserType { get; set; }

        /// <summary>
        /// 微信用户的unionId
        /// </summary>
        public String UnionId { get; set; }

        bool _isLogin = false;
        public bool IsLogin {
            get
            {
                return _isLogin;
            } set
            {
                _isLogin = value;
            }
        }
    }
}
